package net.csdra.wenhua.nanan.qiandao.service;

import net.csdra.wenhua.nanan.qiandao.domain.CheckIn;
import org.springframework.data.domain.Page;

import java.sql.Timestamp;
import java.util.List;

/**
 * Created by xiaomi on 2017/2/20.
 */
public interface CheckInService {

    CheckIn createCheckIn(CreateCheckIn createCheckIn);

    CheckIn updateCheckIn(UpdateCheckIn updateCheckIn);

    List<CheckIn> getCheckInListByUserId(String userId);

    class CreateCheckIn {

        String userId;

        public String getUserId() {
            return userId;
        }

        public void setUserId(String userId) {
            this.userId = userId;
        }

        @Override
        public String toString() {
            return "CreateCheckIn{" +
                    "userId='" + userId + '\'' +
                    '}';
        }
    }

    class UpdateCheckIn extends CreateCheckIn{
        String checkInId;

        public String getCheckInId() {
            return checkInId;
        }

        public void setCheckInId(String checkInId) {
            this.checkInId = checkInId;
        }

        @Override
        public String toString() {
            return "UpdateCheckIn{" +
                    "checkInId='" + checkInId + '\'' +
                    '}';
        }
    }

    class CheckInReturn{
        int totalCheckInNum;
        int continuousNum;
        String userInfo;
        boolean signed;

        public CheckInReturn(int totalCheckInNum, int continuousNum, String userInfo, boolean signed) {
            this.totalCheckInNum = totalCheckInNum;
            this.continuousNum = continuousNum;
            this.userInfo = userInfo;
            this.signed = signed;
        }

        public int getTotalCheckInNum() {
            return totalCheckInNum;
        }

        public void setTotalCheckInNum(int totalCheckInNum) {
            this.totalCheckInNum = totalCheckInNum;
        }

        public int getContinuousNum() {
            return continuousNum;
        }

        public void setContinuousNum(int continuousNum) {
            this.continuousNum = continuousNum;
        }

        public String getUserInfo() {
            return userInfo;
        }

        public void setUserInfo(String userInfo) {
            this.userInfo = userInfo;
        }

        public boolean isSigned() {
            return signed;
        }

        public void setSigned(boolean signed) {
            this.signed = signed;
        }

        @Override
        public String toString() {
            return "CheckInReturn{" +
                    "totalCheckInNum=" + totalCheckInNum +
                    ", continuousNum=" + continuousNum +
                    ", userInfo='" + userInfo + '\'' +
                    ", signed=" + signed +
                    '}';
        }
    }
}
